{extend name='public/base' /}
{block name='content'}
{include file='public/content_header' /}
<section class="content">
    <div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-header dataSearch">
                <form class="form-inline searchForm" id="searchForm" action="" method="GET">

                    
                    <div class="input-group input-group-sm searchGroup">
                        <input value="{$create_time|default=''}" readonly name="create_time" id="create_time" class="form-control input-sm indexSearchDateRange" placeholder="时间">
                    </div>
                    <script>
                        laydate.render({
                            elem: '#create_time',
                            range: true,
                        });
                    </script>


                    <div class="form-group searchGroup">
                        <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <!-- 表单头部 -->
                <div class="card-header">
                    <div class="btn-group">
                        <a class="btn flat btn-sm btn-default BackButton">
                            <i class="fas fa-arrow-left"></i>
                            返回
                        </a>
                    </div>
                </div>
                <!-- 表单 -->
                <div class="card-body">
                <div class="chart">

                    <div id="chart1" style="width: 100%;min-height: 380px;">

                    </div>

                </div>
            </div>
            </div>
        </div>
    </div>
</section>
<script>

     

    $(function (){

        let chartDom = document.getElementById('chart1');
        let myChart = echarts.init(chartDom);
        let option;

        option = {
            xAxis: {
                type: 'category',
                data: {$time|raw}
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: {$price|raw},
                    type: 'line',
                    smooth: true
                }
            ]
        };

        option && myChart.setOption(option);
    });




</script>
{/block}